<html>
<head><meta charset="utf-8"><title>did save failing · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/did.20save.20failing.html">did save failing</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="217936855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/did%20save%20failing/near/217936855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Martin Asquino <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/did.20save.20failing.html#217936855">(Nov 25 2020 at 20:42)</a>:</h4>
<p>Hi there, I'm having some issues with the latest release on saving a file. I'm getting the following log</p>
<div class="codehilite"><pre><span></span><code>thread &#39;main&#39; panicked at &#39;Invalid notification
Method: textDocument/didSave
 error: missing field `version`&#39;, /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/lsp-server-0.5.0/src/msg.rs:192:17
stack backtrace:
   0: _rust_begin_unwind
   1: std::panicking::begin_panic_fmt
   2: lsp_server::msg::Notification::extract::{{closure}}
   3: lsp_server::msg::Notification::extract
   4: rust_analyzer::dispatch::NotificationDispatcher::on
   5: rust_analyzer::main_loop::&lt;impl rust_analyzer::global_state::GlobalState&gt;::handle_event
   6: rust_analyzer::main_loop::main_loop
   7: rust_analyzer::main
</code></pre></div>
<p>I was looking into the lsp-server crate and it seems like it uses lsp-types 0.83.1, while rust-analyzer uses 0.84, which I think introduces a breaking change in regards to 0.83.1 (drops the versioned text document in didSave in favour of the old text document without version).</p>
<p>Is anyone else experiencing this?</p>



<a name="217937377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/did%20save%20failing/near/217937377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/did.20save.20failing.html#217937377">(Nov 25 2020 at 20:47)</a>:</h4>
<p>It's been fixed on master</p>



<a name="217937427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/did%20save%20failing/near/217937427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/did.20save.20failing.html#217937427">(Nov 25 2020 at 20:48)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/pull/6619">https://github.com/rust-analyzer/rust-analyzer/pull/6619</a></p>



<a name="217949150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/did%20save%20failing/near/217949150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Martin Asquino <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/did.20save.20failing.html#217949150">(Nov 25 2020 at 23:01)</a>:</h4>
<p>ah cool thank you! <span aria-label="bow" class="emoji emoji-1f647" role="img" title="bow">:bow:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>